<template>
  <div>
    <div class="paginations">
      <el-pagination
        background
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-size="10"
        layout="total, prev, pager, next"
        :total="total"
      ></el-pagination>
    </div>
  </div>
</template>
<script>
export default {
  props:['total','turnPageObj','currentPage'],
  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
      this.$emit('pageTurnSize',val)
    },
    handleCurrentChange(val) {
      this.$emit('pageTurnNum',val)
      console.log(`当前页: ${val}`);
    }
  },
  data() {
    return {
      currentPages: 1,
    };
  },
  mounted(){
    this.currentPages = this.currentPage;
    console.log(this.currentPage)
  }
};
</script>
<style lang="less">
  
</style>